package com.guage.task;

import org.apache.logging.log4j.LogManager;
import org.apache.logging.log4j.Logger;

import com.guage.commons.utils.JsonUtils;
import com.guage.service.IRoleService;

public class SelectCronFromDbTaskThread extends Thread {
	private static final Logger logger = LogManager.getLogger(SelectCronFromDbTaskThread.class);
	private String cron;
	private IRoleService roleService;
	public SelectCronFromDbTaskThread(String cron,IRoleService roleService) {
		this.cron = cron;
		this.roleService = roleService;
	}

	@Override
	public void run() {
		Object obj = roleService.selectTree();
		logger.info("数据库中获取的数据为：-----------"+JsonUtils.toJson(obj));
		cron = "0/10 * * * * ?";
		logger.info("当前cron修改为："+cron);
	}
}
